{%include file="index.header.tpl.php"%}
{%include file="index.left.tpl.php"%}
  <!--主要内容开始-->
  <div class="content-wrapper">
    <section class="content">
      <div class="row">
        <section class="col-lg-12 connectedSortable">
         <div class="box box-default box-solid">
                <div class="box-header with-border">
                    <span class="fa fa-edit (alias)" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                    <p class="box-title">{%$exam_name%}{%$class_name%}{%$subject_name%}成绩</p>
                </div>
                <div class="box-body">
                       <table class="table table-bordered table-striped"  id="mytable">
                            <thead>
                                    <tr style="background-color:#fcb53f;">
                                        <td>学号</td>
                                        <td>姓名</td>
										<td>{%$subject_name%}</td>
                                        <td width="100">操作</td>
                                    </tr>
                           </thead>	
									{%foreach from=$score_lists key=key item=value%}
                                    <tr>
                                        <td>{%$value.student_no%}</td>
                                        <td>{%$value.student_name%}</td>
										<td>{%$value.score_value%}</td>
                                        <td>
                                            <a href="index.php?a=score.update&score_id={%$value.score_id%}" class="btn btn-warning btn-sm"  title="修改"><i class="fa fa-edit (alias)"></i></a> 
                                        </td>
                                    </tr>	
									{%/foreach%}

                                   
                        </table>  
				</div><!--box-body -->
                <div class="box-footer" style="padding-top:40px;">
                     <h4  style="text-align:center; margin-bottom:20px;">{%$exam_name%}{%$class_name%}{%$subject_name%}成绩分数段情况</h4>
				     <div id="chartContainer" style="height:360px; width:60%;"></div>
                     <p style="float:right;">X：分数段，Y：人数</p>
                </div>
           </div><!--box box-default box-solid-->
         </section>   
        </div><!--row-->
    </section>
 </div>
  <!--主要内容结束-->
{%include file="index.footer.tpl.php"%}
<script src="static/js/canvasjs.min.js"></script>
<script type="text/javascript">
	window.onload = function () {
		var chart = new CanvasJS.Chart("chartContainer", {
			title: {
				text: " "
			},
			data: [{
				type: "column",
				dataPoints: [
					{%foreach from=$level_lists key=key item=value%}
					{ y: {%$value%}, label: "{%$key%}", indexLabel: "{%$value%}" },
					{%/foreach%}
				]
			}]
		});
		chart.render();
	}
</script>


